/*
    A 昵称
    B 性别
    C 好友数量
    D 粉丝数量
    E 个人主页/公共主页
    F 电话号码
    G 邮箱
    H 所在地
    I 来自地区
    J 个人主页连接
 */
import {Schema, model, Document, Model} from "mongoose";

interface HomeDocument extends Document {
    nikename: string;
    gender: string;
    friends: string
    followers: string;
    personal: string;
    phone: string;
    email: string
    location: string;
    region: string
    link: string
}

const HomeSchema: Schema = new Schema<HomeDocument>({
    nikename: {type: String, required: true},
    gender: {type: String, required: true},
    friends: {type: String, required: true},
    followers: {type: String, required: true},
    personal: {type: String, required: true},
    phone: {type: String, required: true},
    email: {type: String, required: true},
    location: {type: String, required: true},
    region: {type: String, required: true},
    link: {type: String, required: true, unique: true, index: true},
});

export const HomeModel: Model<HomeDocument> = model<HomeDocument>('homePage', HomeSchema);